<?php
/**
 * Created by PhpStorm.
 * User: zhouxin
 * Date: 2018/9/29
 * Time: 19:46
 */

header("Content-Type:application/json;charset=utf-8");
header("Access-Control-Allow-Origin:*");


$dbHost="localhost";
$connName="root";
$connPwd="";
$dataBase="mailegou";
$connPort="3306";


//1.创建链接
$conn=new mysqli($dbHost,$connName,$connPwd,$dataBase,$connPort);
//2.设置链接链接字符集
mysqli_query($conn,"set names utf8");